﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace ExamServer.Migrations
{
    public partial class addMenus : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DeleteData(
                table: "tbUsers",
                keyColumn: "Id",
                keyValue: new Guid("a15efdd2-cf70-48f3-85b2-073bb39cdfbb"));

            migrationBuilder.DeleteData(
                table: "tbUsers",
                keyColumn: "Id",
                keyValue: new Guid("a26959e2-bdd4-4f31-a503-3f3e22781969"));

            migrationBuilder.CreateTable(
                name: "tbMenus",
                columns: table => new
                {
                    Id = table.Column<int>(nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    name = table.Column<string>(nullable: false),
                    icon = table.Column<string>(nullable: true),
                    url = table.Column<string>(nullable: true),
                    Pid = table.Column<int>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_tbMenus", x => x.Id);
                });

            migrationBuilder.InsertData(
                table: "tbUsers",
                columns: new[] { "Id", "Birthday", "Email", "Name", "Password", "Remark" },
                values: new object[] { new Guid("40aaa7a3-6c73-4db7-ab4d-78d6eb08e061"), "1990-01-01", "zhangsan@163.com", "张三", "123456", null });

            migrationBuilder.InsertData(
                table: "tbUsers",
                columns: new[] { "Id", "Birthday", "Email", "Name", "Password", "Remark" },
                values: new object[] { new Guid("c33982f3-f266-4301-9b20-c8ab9b1d7f04"), "1992-01-01", "lisi@qq.com", "李四", "123456", null });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "tbMenus");

            migrationBuilder.DeleteData(
                table: "tbUsers",
                keyColumn: "Id",
                keyValue: new Guid("40aaa7a3-6c73-4db7-ab4d-78d6eb08e061"));

            migrationBuilder.DeleteData(
                table: "tbUsers",
                keyColumn: "Id",
                keyValue: new Guid("c33982f3-f266-4301-9b20-c8ab9b1d7f04"));

            migrationBuilder.InsertData(
                table: "tbUsers",
                columns: new[] { "Id", "Birthday", "Email", "Name", "Password", "Remark" },
                values: new object[] { new Guid("a15efdd2-cf70-48f3-85b2-073bb39cdfbb"), "1990-01-01", "zhangsan@163.com", "张三", "123456", null });

            migrationBuilder.InsertData(
                table: "tbUsers",
                columns: new[] { "Id", "Birthday", "Email", "Name", "Password", "Remark" },
                values: new object[] { new Guid("a26959e2-bdd4-4f31-a503-3f3e22781969"), "1992-01-01", "lisi@qq.com", "李四", "123456", null });
        }
    }
}
